# Usage: sailho.tcl

if {![info exists eWorkDir]} {set eWorkDir [file dirname [info script]]}

package require DPeye

create {
	outputFile sailho.ps 
	mapFile sailho.map
	title "Sail Ho!"
	creator "Mario Huys (woelpad@yahoo.com)"
	$MapDrawingScale 1 $MapUnitScale .7 $MapSupplyScale .7
	$FrameThickness 6
	images {
		chart {sailho.base.ps {scan {1522 1477 7507 7282} {} DrawMap \
			{n newpath m moveto l lineto s stroke SEA {Blue fill} ISLAND {Brown fill} gs {} gr {} cen {}} {Framecolor s Black s}} {} {3 0 -30 700 1 .08}}
		coordinates {sailho.base.ps {scan {} {provinces INFO supplies TLA powers COUNTRY}} {} {0 0 28 58}}
	}
	borders {
		island {image {chart Brown} LandBrown Border}
		internalBorders {image {chart Black} {} InternalBorder}
	}
	locationTypes {
		Supplies {number 0 name 0 draw 1 define -1}
		Territories {number 0 name 1 populate 0 info 1}
	}
	locations {
		supplies {{coordinates supplies} Supplies s {Blue {} S}}
		coasts {{coordinates provinces} Territories c {Red DarkGreen AF} {
			AEO ALC AMA APH ARG CEN CHA CHI CUP ECH ELY GAB
			HAD HER HIN HIP JAS JOX LES MID MIN MOR NES PER
			PRO SAL SER STR TAR VES XEN
		}}
		lands {{coordinates provinces} Territories l {Green DarkGreen A} {
			ARE AUT CAL DEI FIE FUR OLY SIS TAN ZEU
		}}
		waters {{coordinates provinces} Territories w {White White F} {
			CEC EAS FIR GLI GOC LBS LOV NAR PEA POS SCH SOA
			SOD SOT SOU SOW WES
		}}
		greens {{coordinates provinces} Territories g {DarkGreen DarkGreen A} {
			HES PSY
		}}
		beaches {{coordinates provinces} Territories b {Yellow {} F} {
			HES/NC HES/SC PSY/EC PSY/WC
		}}
	}
	units {
		fleet {F ManOfWar}
	}
	frame {bbox {} SeaBlue FrameBorder}
	layout {corner adjustments} fontSize 12 
	orderHasHeading 2
	drawLayoutBorder 0 composed 0 printLayout 0 testBorder 0 
	addPage 1 pageContents0 {
		"\{"

		"200 40 DrawFleet"
		"200 40 180 140 ArrowPropose"
		"200 40 100 20 ArrowRetreat"
		"200 40 300 60 ArrowMove"
		
		"180 140 DrawArmy"
		"ProposePhase"
		"180 140 160 240 ArrowMove"
		"RetreatPhase"
		"180 140 80 120 ArrowMove"
		"MovePhase"
		"180 140 280 160 ArrowMove"

		"300 90 DrawFleet"
		"300 90 200 40 180 140 ArrowSupport"
		"300 120 DrawArmy"
		"300 120 180 140 ArrowHold"
		"300 150 DrawFleet"
		"300 150 180 140 160 240 ArrowConvoy"

		"\} dup exec -40 200 translate FailedOrder exec OkOrder 40 -200 translate"
				
		"400 200 DrawFleet"
		"400 200 ArrowArrive"
		"400 230 DrawArmy"
		"400 230 ArrowDepart"
		"400 260 DrawFleet"
		"400 260 ArrowRetreatArrive"
		"400 290 DrawArmy"
		"400 290 ArrowRetreatDepart"
		
		"500 200 DrawFleet"
		"500 200 BuildUnit"
		"500 230 DrawArmy"
		"500 230 DestroyUnit"
		"500 260 DrawFleet"
		"500 260 DisbandUnit"
		"500 290 DrawArmy"
		"500 290 RemoveUnit"
		"500 320 DrawFleet"
		"500 320 FindUnit"
		"500 350 DrawArmy"
		"500 350 LoseUnit"
		"500 380 DrawFleet"
		"500 380 QueryUnit"
    }
}
